package com.py.apis.task;


import com.py.model.common.dtos.ResponseResult;
import com.py.model.schedule.dtos.Task;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-schedule")
public interface ITaskClient {

    @PostMapping("/task/add")
    public ResponseResult addTask(@RequestBody Task task);


    /**
     * 定时拉取list缓存中的文章数据执行审核
     */
    @GetMapping("/task/poll/{type}/{priority}")
    public ResponseResult poll(@PathVariable("type") int type, @PathVariable("priority")  int priority);
}


